Skip to content

http2: expose writable stream state on compat response#63003

Merged
nodejs-github-bot merged 1 commit intonodejs:mainfrom
cookesan:fix-http2-writable-properties
Apr 30, 2026
Merged

http2: expose writable stream state on compat response#63003
nodejs-github-bot merged 1 commit intonodejs:mainfrom
cookesan:fix-http2-writable-properties

Conversation

@cookesan
Copy link
Copy Markdown
Contributor

Fixes: #63000

This adds the missing writableObjectMode and writableNeedDrain getters to Http2ServerResponse in the HTTP/2 compatibility layer. The getters mirror the underlying stream, matching the existing writable state properties.

The writable-properties test now covers both properties.

Tests:

  • ./configure --ninja
  • ninja -C out/Release node
  • git diff --check
  • ./out/Release/node --check lib/internal/http2/compat.js
  • ./out/Release/node --check test/parallel/test-http2-res-writable-properties.js
  • python3 tools/test.py --mode=release test/parallel/test-http2-res-writable-properties.js
  • python3 tools/test.py --mode=release test/parallel/test-http2-res-writable-properties.js test/parallel/test-http2-compat-serverresponse.js test/parallel/test-http2-compat-serverresponse-finished.js test/parallel/test-http2-compat-serverresponse-drain.js
  • make lint-js LINT_JS_TARGETS="lib/internal/http2/compat.js test/parallel/test-http2-res-writable-properties.js"

@nodejs-github-bot
Copy link
Copy Markdown
Collaborator

Review requested:

  • @nodejs/http2
  • @nodejs/net

@nodejs-github-bot nodejs-github-bot added http2 Issues or PRs related to the http2 subsystem. needs-ci PRs that need a full CI run. labels Apr 28, 2026
Copy link
Copy Markdown
Member

@mcollina mcollina left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@mcollina mcollina added the request-ci Add this label to start a Jenkins CI on a PR. label Apr 28, 2026
@github-actions github-actions Bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Apr 28, 2026
@nodejs-github-bot
Copy link
Copy Markdown
Collaborator

@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 28, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 89.65%. Comparing base (4e3a873) to head (dc17755).
⚠️ Report is 21 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #63003      +/-   ##
==========================================
- Coverage   91.47%   89.65%   -1.83%     
==========================================
  Files         357      708     +351     
  Lines      150883   220382   +69499     
  Branches    23778    42275   +18497     
==========================================
+ Hits       138026   197575   +59549     
- Misses      12582    14665    +2083     
- Partials      275     8142    +7867     
Files with missing lines Coverage Δ
lib/internal/http2/compat.js 96.96% <100.00%> (+0.02%) ⬆️

... and 472 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@mcollina
Copy link
Copy Markdown
Member

Can you fix the commit message according to our guidelines?

Signed-off-by: Terry Chen <terry@example.com>
@cookesan cookesan force-pushed the fix-http2-writable-properties branch from ab628ad to dc17755 Compare April 28, 2026 16:57
@cookesan
Copy link
Copy Markdown
Contributor Author

Fixed, thanks.

Copy link
Copy Markdown
Member

@mcollina mcollina left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@mcollina mcollina added the request-ci Add this label to start a Jenkins CI on a PR. label Apr 29, 2026
@github-actions github-actions Bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Apr 29, 2026
@nodejs-github-bot
Copy link
Copy Markdown
Collaborator

@pimterry pimterry added the commit-queue Add this label to land a pull request using GitHub Actions. label Apr 30, 2026
@nodejs-github-bot nodejs-github-bot removed the commit-queue Add this label to land a pull request using GitHub Actions. label Apr 30, 2026
@nodejs-github-bot nodejs-github-bot merged commit f625c4b into nodejs:main Apr 30, 2026
73 checks passed
@nodejs-github-bot
Copy link
Copy Markdown
Collaborator

Landed in f625c4b

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

http2 Issues or PRs related to the http2 subsystem. needs-ci PRs that need a full CI run.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

http2: Http2ServerResponse missing writableObjectMode and writableNeedDrain

4 participants